[org 0x7c00]
    mov bp, 0x9000 ; set the stack
    mov sp, bp

    mov bx, HELLO_16_REAL_MODE
    call print
    call print_nl

    call switch_to_pm
    jmp $

%include "04/boot_sect_print.asm"
%include "06/32bit-gdt.asm"
%include "06/32bit-print.asm"
%include "06/32bit-switch.asm"

[bits 32]
BEGIN_PM:
    mov ebx, HELLO_32_PROTECT_MODE
    call print_string_pm
    jmp $

HELLO_16_REAL_MODE:
    db 'Hello 16 bit Real Mode', 0

HELLO_32_PROTECT_MODE:
    db 'Hello 32 bit Protect Mode', 0

times 510-($-$$) db 0
dw 0xaa55